<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://qzone.qq.com/251303704/pagination" prefix="p" %>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
	<head>
		<base href="<%=basePath%>"/>
		<meta charset="utf-8" />
		<title>Document</title>
	</head> 
	<style type="text/css">
		table{
			width:100%;
			border-collapse:collapse;
			
		}
		table tr{
			border:1px solid #B5CFD9;
			text-align: center;
		}
		table td{
			border:1px solid #B5CFD9;
			text-align: center;
			
			
		}
		table td img{
			margin:0px;
		}
		.select{
			text-align: center;
		}
		.name{
			border:0px;
			height:22px;
			width:200px;
			border:1px solid #B5CFD9;
		}
		.chaxun{
			background-color:#B87354;
			color:#fff;
			width:50px;
			text-align:center;
			border-radius:5px;
			border:0px;
			height:25px;
			cursor: pointer;
		}
		.chaxun:hover{
			background-color:#AA895E;
		}
		.page{
			margin-top:20px;
			float:right;
		}
		.page a{
			color:#000;
			text-decoration: none;
			padding:5px 10px;
			border:1px solid #eee;
			margin:0px 5px;
		}
		.page a:hover{
			color:#B81C22;
		}
		.page a.active{
			font-weight:bold;
			color:#fff;
			background-color:#B87354;
		}
		.page a:hover{
			cursor: default;	
		}
		.page a{
			color:#000;
		}
		.page  a:hover{
			cursor: default;	
		}
	</style>
	<body>
	<%@ include file="/HT/login_control.jsp" %>
	<!-- <h1 style="text-align:center">所有商品</h1> -->
	<form action="HTshopping.shtml" method="post" id="form1">
		<div class="select">
			<p>请输入商品名称：<input type="text" name="shoppname" class="name" value="${shoppingname }">&emsp;<input type="submit" value="查询" class="chaxun"></p>
		</div>
		<div id="hezi">
			<table> 
				<tr>
					<td>图片</td>
					<td>名称</td>
					<td>价格</td>
					<td>类型</td>
					<td>详情</td>
					<td>操作</td>
				</tr>
				<c:forEach items="${list }" var="shopp">
				
				<tr>
					
					<td style="padding-top:10px"><img src="HT/images/shopping/${shopp.s_images }" width="50px"></td>
					<td>${shopp.s_name }</td>
					<td>${shopp.s_price }</td>
					<td>${shopp.m_name }</td>
					<td><a href="/Vancl/findshopp.shtml?id=${shopp.s_id }&&name=${shopp.s_name }">查看</a></td>
					<td><a href="deleteshopping.shtml?id=${shopp.s_id }" onclick="return confirm('确定要删除该商品吗？')">删除</a>   <a href="updateshopping.shtml?id=${shopp.s_id }">修改</a>   </td>
				</tr>
				</c:forEach>
			</table>
			
		</div>
		<p:page pageBean="${pageBean }"/>
		</form>
	</body>
</html>
